﻿<div class="span10">
	<h1>Editar Reserva</h1>
	<?php echo Flash::render(); ?>
	<?php echo Form::open('reserva/editar/'.$reserva->id, array('id' => 'reserva_cadastrar', 'class' => 'well')); ?>
	<label>Responsavel: </label>
	<select name="responsavel" class="required">
		<option disabled="disabled">Selecione um Responsável</option>
		<?php foreach($responsaveis as $responsavel): ?>
		<option value="<?php echo $responsavel->id; ?>" <?php echo ($responsavel->id == $reserva->responsavel->id) ? 'selected="selected"' : ''; ?>><?php echo $responsavel->nome; ?></option>
		<?php endforeach; ?>
	</select>
	<script>
		$(document).ready(function(){
			$('.data').mask('99/99/9999');
			$('.hora').mask('00:00');
		});
	</script>
	<label>Atividade: </label>
	<textarea name="atividade" class="span4" placeholder="Descrição da Atividade"><?php echo $reserva->atividade; ?></textarea><br>
	<button type="submit" name="editar" class="btn btn-primary">Editar</button>
	<?php echo Form::close(); ?>
	
	
	<?php $view = new View('periodo/lista'); $view->bind('periodos', $periodos); echo $view; ?>
	
</div>